package com.csi.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * 合作表
 */
@Schema(description = "旅行社酒店合作信息")
@Data
public class HotelTravel {
    @Schema(description = "旅行社酒店合作ID", required = true)
    private long id; //旅行社酒店合作id

    @Schema(description = "酒店ID", required = true)
    private long hotelId; //酒店id

    @Schema(description = "旅行社ID", required = true)
    private long travelId; //旅行社id

    @Schema(description = "房间类型ID", required = true)
    private long roomType; //房间类型id

    @Schema(description = "房间数量", required = true)
    private String roomNum; //房间数量


    @Schema(description = "入住时间", required = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd") //转换时间格式
    private Timestamp checkInDate; //入住时间

    @Schema(description = "退房时间", required = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd") //转换时间格式
    private Timestamp checkOutDate; //退房时间

    @Schema(description = "总价格", required = true)
    private BigDecimal totalPrice; //总价格

    @Schema(description = "申请人", required = true)
    private String userId; //申请人

    @Schema(description = "合同文件")
    private String file; //合同
}
